﻿<%@ Page Title="" Language="C#" MasterPageFile="MasterPage.master" AutoEventWireup="true" CodeFile="ManagementContract.aspx.cs" Inherits="Home" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    <div class="choice-category">
        <ul>
            <li><a style="background:url('./img/customer_icon.png') no-repeat scroll 30px 20px transparent;" href="AddCustomer.aspx">Add Customer</a></li>
            <li><a style="background:url('./img/service.png') no-repeat scroll 30px 15px transparent;" href="AddService.aspx">Add Service</a></li>
            <li><a style="background:url('./img/sub-service.png') no-repeat scroll 30px 15px transparent;" href="AddSubService.aspx">Add SubService</a></li>
            <li><a style="background:url('./img/payment.png') no-repeat scroll 30px 15px transparent;" href="AddService.aspx">Add Service</a></li>
            <li><a style="background:url('./img/hoadon.png') no-repeat scroll 30px 15px transparent;" href="Report.aspx">Report</a></li>
        </ul>
    </div>
    <div class="orders-most" style="float:left;margin-top:20px;">
        
        <div class="orders-title" style="background: #E9E9E9; width: 740px; color: #222222; font-weight: bold; padding: 10px; border-bottom: 1px solid rgb(204, 204, 204);">
            <asp:Label ID="Label1" runat="server" Text="Search by :"></asp:Label>
                <asp:DropDownList ID="DropDownList1" runat="server" Width="120px">
                    <asp:ListItem Value="ContractID">Contract ID</asp:ListItem>
                    <asp:ListItem Value="CustomerID">Customer ID</asp:ListItem>
                    <asp:ListItem Value="CustomerName">Customer Name</asp:ListItem>
            </asp:DropDownList>
            <asp:TextBox ID="txtSearch" runat="server"></asp:TextBox>
            <asp:Button ID="Button1" runat="server" Text="Search" OnClick="Button1_Click" />
        </div>
        <div class="orders-title" style="background:#E9E9E9;width:740px;color:#222222;font-weight:bold;padding:10px;border-bottom:1px solid rgb(204, 204, 204);">Active Contract</div>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ContractID" OnRowDeleting="GridView1_RowDeleting" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" AllowPaging="True" OnPageIndexChanging="GridView1_PageIndexChanging" OnRowUpdating="GridView1_RowUpdating">
            <Columns>
                <asp:TemplateField HeaderText="#">
                    <ItemTemplate>
                        <asp:Button ID="Button1" runat="server" CommandName="delete" OnClientClick="return confirm('Are you sure you want to cancel this Contract?');" Text="Cancel" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="ContractID" HeaderText="ContractID">
                <ItemStyle Width="30px" />
                </asp:BoundField>
                <asp:BoundField DataField="CustomerID" HeaderText="CustomerID" />
                <asp:BoundField DataField="CustomerName" HeaderText="Name" />
                <asp:BoundField DataField="Phone" HeaderText="Phone" />
                <asp:BoundField DataField="Email" HeaderText="Email" />
                <asp:BoundField DataField="DateCreate" HeaderText="Date Create" DataFormatString="{0:d}" />
                <asp:BoundField DataField="Status" HeaderText="Status" />
                <asp:ButtonField ButtonType="Button" CommandName="update" HeaderText="Contract Detail" Text="Detail" />
                <asp:ButtonField ButtonType="Button" CommandName="select" HeaderText="#" Text="Active" />
            </Columns>
        </asp:GridView>
        <div class="orders-title" style="background:#E9E9E9;width:740px;color:#222222;font-weight:bold;padding:10px;border-bottom:1px solid rgb(204, 204, 204);">History</div>
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataKeyNames="ContractID" OnSelectedIndexChanged="GridView2_SelectedIndexChanged" AllowPaging="True" OnPageIndexChanging="GridView2_PageIndexChanging" OnRowDeleting="GridView2_RowDeleting">
            <Columns>
                <asp:TemplateField HeaderText="#">
                    <ItemTemplate>
                        <asp:Button ID="Button2" runat="server" Text="Cancel" OnClientClick="return confirm('Are you sure you want to cancel this Contract?');" CommandName="delete" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="ContractID" HeaderText="ContractID">
                <ItemStyle Width="30px" />
                </asp:BoundField>
                <asp:BoundField DataField="CustomerID" HeaderText="CustomerID" />
                <asp:BoundField DataField="CustomerName" HeaderText="Name" />
                <asp:BoundField DataField="Phone" HeaderText="Phone" />
                <asp:BoundField DataField="Email" HeaderText="Email" />
                <asp:BoundField DataField="DateCreate" HeaderText="Date Create" DataFormatString="{0:d}" />
                <asp:BoundField DataField="DateActive" HeaderText="Date Active" DataFormatString="{0:d}"/>
                <asp:BoundField DataField="Status" HeaderText="Status" />
                <asp:ButtonField ButtonType="Button" CommandName="select" HeaderText="#" Text="Detail"  />
            </Columns>
        </asp:GridView>
    </div>
</asp:Content>

    